//医院API
import request from "../utils/request";

const api_url=`/api/hospital`

export default {

  //根据排班id获取排班数据
  getSchedule(id) {
    return request({
      url: `${api_url}/getSchedule/${id}`,
      method: 'get'
    })
  },


  //获取可预约排班数据
  getBookingScheduleRule(page, limit, hoscode, depcode) {
    return request({
      url: `${api_url}/auth/getBookingScheduleRule/${page}/${limit}/${hoscode}/${depcode}`,
      method: 'get'
    })
  },

  //获取排班数据
  findScheduleList(hoscode, depcode, workDate) {
    return request({
      url: `${api_url}/auth/findScheduleList/${hoscode}/${depcode}/${workDate}`,
      method: 'get'
    })
  },


  //根据医院编号获取医院预约挂号详情
  getHospitalRegisteredByHoscode(hoscode){
    return request({
      url: `${api_url}/getHospitalRegisteredByHoscode/${hoscode}`,
      method: "GET"
    })
  },

  //根据医院编号获取科室
  getDepartmentByHoscode(hoscode){
    return request({
      url: `${api_url}/getDepartmentByHoscode/${hoscode}`,
      method: "GET"
    })
  },

   //根据医院名称模糊查询
  findByHospNameLike(hosname){
    return request({
      url: `${api_url}/findByHospName/${hosname}`,
      //url: api_url+`/findByHospName/${hosname}`,
      method: "GET"
    })
  },

  //查询医院列表
  findHospitalPageList(page,limit,searchObj) {
    return request({
      url: `${api_url}/findHospList1/${page}/${limit}`,
      //url: `/api/hosp/hospital/findHospList1/${page}/${limit}`,
      method: 'GET',
      params: searchObj
    })
  },
}
